import React from 'react'
import {useNavigate} from 'react-router-dom'


function HocLogin(Cmp){
    const navigate=useNavigate()
    const token=localStorage.getItem("token")
     if(token){
         navigate("/login")
     }
   return <Cmp></Cmp>
}

export default HocLogin

